package com.lehe.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.lehe.entry.xh.UserDto;

@Mapper
public interface XHUserListDao {
	
	/**
	 * 用户列表查询列表sql
	 * @param queryStr
	 * @param parentId 查询父级是该ID的用户
	 * @param sd
	 * @param ed
	 * @param level
	 * @param orderBy
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public List<UserDto> queryUserList(@Param("queryStr")String queryStr,
			@Param("topId")Long topId,
			@Param("userId")Long userId,
			@Param("parentId")Long parentId,
			@Param("sd")String sd,
			@Param("ed")String ed, 
			@Param("level")String level,
			@Param("orderBy")String orderBy,
			@Param("page")Integer pageIndex, 
			@Param("pageSize")Integer pageSize
	);
	public Integer queryUserListCount(@Param("queryStr")String queryStr,@Param("topId")Long topId,@Param("userId")Long userId,@Param("parentId")Long parentId,@Param("level")String level);
	/**
	 * 将指定的用户id修改成代理玩家
	 * @param userId
	 */
	public void updateUserToAgent(@Param("userId")Long userId);
	
	public void updateApply(@Param("gg")Long userId, @Param("userId")Long childId);

}
